package net.hg.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import net.hg.entity.SecDt;
import net.hg.service.SecDtService;
import net.hg.utils.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Api(tags = "二级菜单相关接口")
@RestController
@RequestMapping("/sec")
@Slf4j
public class SecDtController {
    /**
     * 服务对象
     */
    @Resource
    private SecDtService secDtService;


    @ApiOperation("修改二级菜单")
    @PostMapping("/update")
    public Result update(@RequestBody SecDt secDt){
        int i = secDtService.update(secDt);
        if(i > 0 ){
            return Result.success("修改成功");
        }
        return Result.error("修改失败，请稍后尝试");
    }


}

